<?php  
header("content-type:text/html;charset=utf-8");
$link =mysql_connect("localhost","root","root");  
mysql_select_db("pro", $link);  
$del_id=$_GET["id"];  
$exec="delete from type where id=$del_id";  
$result=mysql_query($exec);  
if($result)
{
//跳转页面
header("location:d.php");  //删除成功，则跳转回显示页面
}
else
{
echo "删除失败！";
} 

mysql_close($link);  
?> 

